<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
    <style>
        table,
        td,
        th {
   
            border:1px solid black;
            border-collapse:collapse;
        }

        table td {
        padding: 10px 30px;
        }
        .a{
            border-style:groove;
            background-color: aliceblue;
        }
        .t1{
            background-color: #99ffcc;
        }
        .t2{
            background-color: #ffb6c1;
        }
        .t3{
            height: 150px;
            background-color: #0cc;
            z-index: 999;
        }

    </style>
</head>

<body>
    <div id="app">
        <mycom :msg="msg" @my-event="xyz"></mycom>
    </div>
    <script>
        var ti_me = new Date().toLocaleString();
        var component1 = {
            props: ['msg'],
            data() {
                return {
                    commsg: ''
                }
            },
            template:  `
            <div>
            <div>
                <div><table class="t1">
                    <tr><td class="t1"><strong>图书馆人流量</strong></td><td class="t2"><a class="a">年</a><a class="a">月</a><a class="a">日</a></td></tr>
                    <tr class="t3"><td colspan="2">哈哈哈哈哈我是无敌小旋风</tr>
                    </table></div>
            </div>
        </div> 
        `,
            methods: {
                abc() {
                    this.$emit('my-event', this.commsg)
                }
            }
        }
        var vm = new Vue({
            el: '#app',
            data: {
                time:ti_me
            },
            methods: {
                
            },
            components: {
                'mycom': component1
            }
        })
    </script>
</body>

</html>